package cn.jxau.bean.po;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.KeySequence;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

@TableName("t_usercollectionstype")//必须指定表名
@KeySequence("t_sequence_usercollectionstype")//使用oracle序列自动递增
public class UserCollectionsType implements Serializable{
	private static final long serialVersionUID = 1L;
	@TableId(type=IdType.INPUT)
	private Long id;//角色id
	private Long userID;//角色id
	private String name;//类型名
	private Long pid; //收藏树 父节点ID
	private Boolean hasItem=Boolean.FALSE;//是否是主类型（可以包含子类型），默认为false
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getUserID() {
		return userID;
	}
	public void setUserID(Long userID) {
		this.userID = userID;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Long getPid() {
		return pid;
	}
	public void setPid(Long pid) {
		this.pid = pid;
	}
	public Boolean getHasItem() {
		return hasItem;
	}
	public void setHasItem(Boolean hasItem) {
		this.hasItem = hasItem;
	}
	@Override
	public String toString() {
		return "UserCollectionsType [id=" + id + ", userID=" + userID + ", name=" + name + ", pid=" + pid + ", hasItem="
				+ hasItem + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((hasItem == null) ? 0 : hasItem.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((pid == null) ? 0 : pid.hashCode());
		result = prime * result + ((userID == null) ? 0 : userID.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UserCollectionsType other = (UserCollectionsType) obj;
		if (hasItem == null) {
			if (other.hasItem != null)
				return false;
		} else if (!hasItem.equals(other.hasItem))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (pid == null) {
			if (other.pid != null)
				return false;
		} else if (!pid.equals(other.pid))
			return false;
		if (userID == null) {
			if (other.userID != null)
				return false;
		} else if (!userID.equals(other.userID))
			return false;
		return true;
	}
	public UserCollectionsType(Long id, Long userID, String name, Long pid, Boolean hasItem) {
		super();
		this.id = id;
		this.userID = userID;
		this.name = name;
		this.pid = pid;
		this.hasItem = hasItem;
	}
	public UserCollectionsType() {
		super();
	}
}
